﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls.Primitives;
using System.Windows.Controls;
using System.Windows.Data;

namespace SharpMap.Presentation.Wpf
{
    public class StyleEntriesList : ListView
    {
        protected override System.Windows.DependencyObject GetContainerForItemOverride()
        {
            return new StyleListItem();
        }

        protected override void PrepareContainerForItemOverride(System.Windows.DependencyObject element, object item)
        {

            StyleListItem container = element as StyleListItem;
            if (container != null)
            {
                container.DataContext = item;
                container.SetBinding(StyleListItem.StyleViewEntryProperty, new Binding());
            }
        }

    }
}
